// slices/routeSlice.js
import { createSlice } from '@reduxjs/toolkit';

const initialState = {
  childrenRoutes: [],
};

const routeSlice = createSlice({
  name: 'route',
  initialState,
  reducers: {
    setChildrenRoutes: (state, action) => {
      state.childrenRoutes = action.payload;
    },
  },
});

export const { setChildrenRoutes } = routeSlice.actions;
export default routeSlice.reducer;